package com.yt.server.io.amf3;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

/**
 * AMF3协议需要修改,暂时用工厂
 * 
 * @author Administrator
 * 
 */
public class AMF3CodecFactory implements ProtocolCodecFactory {
	
	private AMF3Decoder decoder;

	private AMF3Encoder encoder;
	
	public AMF3CodecFactory() {
		decoder = new AMF3Decoder();
		encoder = new AMF3Encoder();
	}

	@Override
	public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
		return decoder;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
		return encoder;
	}
}
